import request from '@/utils/request'

export function getList(data) {
  return request({
    url: '/mgt/auth/user/query',
    method: 'post',
    data
  })
}

export function saveUser(data) {
  return request({
    url: '/mgt/auth/user/saveByJson',
    method: 'post',
    data
  })
}

export function batchLock(data) {
  return request({
    url: '/mgt/auth/user/batchLock',
    method: 'post',
    data
  })
}

export function batchDelete(data) {
  return request({
    url: '/mgt/auth/user/batchDelete',
    method: 'post',
    data
  })
}


export function changePassword(data) {
  return request({
    url: '/api/auth/user/changePassword',
    method: 'post',
    data
  })
}

export function exportExcel(data) {
  return request({
    url: '/mgt/auth/user/exportExcel',
    method: 'post',
    data
  })
}

////////角色相关接口
export function queryRoleList(data) {
  return request({
    url: '/mgt/auth/role/query',
    method: 'post',
    data
  })
}

export function deleteRoles(data) {
  return request({
    url: '/mgt/auth/role/deletes',
    method: 'post',
    data
  })
}

export function saveRole(data) {
  return request({
    url: '/mgt/auth/role/saveByJson',
    method: 'post',
    data
  })
}

////////权限相关接口
export function queryAccessList(data) {
  return request({
    url: '/mgt/auth/access/query',
    method: 'post',
    data
  })
}

export function saveAccess(data) {
  return request({
    url: '/mgt/auth/access/saveByJson',
    method: 'post',
    data
  })
}

export function deleteAccess(data) {
  return request({
    url: '/mgt/auth/access/deletes',
    method: 'post',
    data
  })
}



